import {Entity, PrimaryGeneratedColumn, Column, OneToOne, JoinColumn, BaseEntity} from 'typeorm';

@Entity()
export class Role extends BaseEntity {
    @PrimaryGeneratedColumn()
    id: number;

    @Column()
    name: string;

    @OneToOne(() => Role)
    @JoinColumn()
    parent: Role;
}
